chore: Upgrade Avalonia to 12.0 and migrate codebase#1673
Draft
yuto-trd wants to merge 25 commits into
Draft
Conversation
Contributor
Minimum allowed line rate is |
49ae40e to
c71c40c
Compare
…port and use WithDeveloperTools()
…l.FluentIcons.FluentAvalonia
…proved data binding
…ndicator to core object editors
…base main側で追加された新規コードがリベース後も移行前のAPIを参照していたため修正: - FluentAvalonia 3.0 のFA接頭辞付き型へ移行 (ContentDialog/IconSource/PickerFlyoutBase/SymbolIcon 等 -> FA*) - Avalonia 12 で非公開化した Visual.GetVisualRoot() を IsAttachedToVisualTree() へ置換 対象: WindowCaptureDialog, CrashRecoveryPromptTask, ToolWindowExtension, ExtensionsToolWindowExtension, OutputPickerFlyoutPresenter, HistoryView, MarkerEditFlyout, OutputPickerFlyout, OutputTab, MainView, CommandPaletteView, SampleToolWindowExtension
c71c40c to
ac43186
Compare
| // needs to know the exact types at compile time. | ||
|
|
||
| [DllImport("/usr/lib/libobjc.A.dylib")] | ||
| private static extern IntPtr objc_getClass(string name); |
| private static extern IntPtr objc_getClass(string name); | ||
|
|
||
| [DllImport("/usr/lib/libobjc.A.dylib")] | ||
| private static extern IntPtr sel_registerName(string name); |
| private static extern IntPtr sel_registerName(string name); | ||
|
|
||
| [DllImport("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend")] | ||
| private static extern IntPtr objc_msgSend_ret(IntPtr receiver, IntPtr selector); |
| private static extern IntPtr objc_msgSend_ret(IntPtr receiver, IntPtr selector); | ||
|
|
||
| [DllImport("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend")] | ||
| private static extern void objc_msgSend_arg(IntPtr receiver, IntPtr selector, IntPtr arg); |
| private static extern void objc_msgSend_arg(IntPtr receiver, IntPtr selector, IntPtr arg); | ||
|
|
||
| [DllImport("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend")] | ||
| private static extern IntPtr objc_msgSend_arg_ret(IntPtr receiver, IntPtr selector, IntPtr arg); |
| private static extern IntPtr objc_msgSend_arg_ret(IntPtr receiver, IntPtr selector, IntPtr arg); | ||
|
|
||
| [DllImport("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend")] | ||
| private static extern void objc_msgSend_bool(IntPtr receiver, IntPtr selector, [MarshalAs(UnmanagedType.I1)] bool arg); |
| private static extern void objc_msgSend_bool(IntPtr receiver, IntPtr selector, [MarshalAs(UnmanagedType.I1)] bool arg); | ||
|
|
||
| [DllImport("/usr/lib/libobjc.A.dylib", EntryPoint = "objc_msgSend")] | ||
| private static extern void objc_msgSend_long(IntPtr receiver, IntPtr selector, long arg); |
|
|
||
| // remove the toolbar to restore the default thin title bar | ||
| if (_nsWindow != IntPtr.Zero && _selSetToolbar != IntPtr.Zero) | ||
| objc_msgSend_arg(_nsWindow, _selSetToolbar, IntPtr.Zero); |
|
|
||
| // 2. cache ObjC selectors used during setup and fullscreen transitions. | ||
| // sel_registerName returns a stable pointer for the lifetime of the process. | ||
| _selSetToolbar = sel_registerName("setToolbar:"); |
| // 2. cache ObjC selectors used during setup and fullscreen transitions. | ||
| // sel_registerName returns a stable pointer for the lifetime of the process. | ||
| _selSetToolbar = sel_registerName("setToolbar:"); | ||
| _selSetTitlebarAppearsTransparent = sel_registerName("setTitlebarAppearsTransparent:"); |
Contributor
|
No TODO comments were found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ReflectionBindingfor dynamic bindings,x:DataTypefor compiled bindings,PlaceholderText,FocusChangedEventArgs,Math.Clamp,Avalonia.Input.Platformnamespace, logical-tree traversal, andTopLevel-based scaling.Avalonia.DiagnosticswithAvaloniaUI.DiagnosticsSupport(WithDeveloperTools()), remove the customBcTabItem/BcTabView/DirectoryTreeViewcontrols, and migrate UI to FluentAvalonia (FA) components including the renamedBeutl.FluentIcons.FluentAvaloniapackage.DirectoryViewTestproject and adjust several window/editor views (styles, drag handling,IListEditorViewModel.IsEnabled, etc.) for consistency under the new framework.Breaking changes
BcTabItem/BcTabVieworDirectoryTreeViewcontrols must migrate to the FluentAvalonia equivalents, since these controls were removed.FluentIcons.FluentAvaloniapackage must switch toBeutl.FluentIcons.FluentAvalonia.Fixed issues
None